package com.xunlai.infra.permission.common.exception;

/**
 * @author liang
 * @date 2022/11/30 11:04
 */
public enum ExceptionCodeEnum {
    SUCCESS(10000,"成功"),
    ACCOUNT_NOT_FOUND(10001,"用户名或密码错误"),
    INVALID_PASSWORD(10002,"密码错误"),
    ACCOUNT_ALREADY_EXISTS(10003,"账号已存在"),

    FIELD_REPEAT(10004,"字段重复"),

    DATA_NOT_EXIST(10005,"数据不存在"),
    ERROR_CAPTCHA(10006,"验证码错误"),
    INVALID_MOBILE(10007,"手机号格式错误"),
    ERROR_SMS_CAPTCHA(10008,"短信验证码错误"),

    DIFFER_PASSWORD(10009,"密码不一致"),
    NOT_LOGIN(10010,"未登录"),
    DATA_REPEAT(10011,"数据重复"),

    POSTER_OVER_LIMIT(10012,"超出可创建海报数量限制"),
    SERVER_ERROR(50000,"服务器异常"),
    ;

    private final int code;

    private final String desc;

    ExceptionCodeEnum(int code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public int getCode() {
        return code;
    }

    public String getDesc() {
        return desc;
    }
}
